<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>索尼中国</title>

    <!-- Bootstrap -->
    <link href="/Public/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">


    <link rel="stylesheet" href="/Public/assets/admin/css/admin.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
     
</head>
<body>

<div class="container">

    <nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">首页</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">内容管理
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Article/index');?>">文章管理</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('Category/index');?>">栏目管理</a></li>
                    </ul>
                </li>


                <li><a href="<?php echo U('Upload/index');?>">附件管理</a></li>
                <li><a href="<?php echo U('Link/index');?>">友情链接管理</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">系统管理
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Config/site_info');?>">站点信息</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('Config/clear_cache');?>">清除缓存</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">尊敬的
                        <?php echo ($_SESSION['user']['username']); ?> 管理员
                        <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="<?php echo U('Config/update_password');?>">修改密码</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="<?php echo U('User/logout');?>">安全退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>


    
    <!--content start-->
    <div class="col-sm-9">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h1 class="panel-title">增加栏目</h1>
            </div>
            <div class="panel-body">
                <!-- TAB NAVIGATION -->
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab1" role="tab" data-toggle="tab">文章信息</a></li>
                    <li><a href="#tab2" role="tab" data-toggle="tab">文章内容</a></li>
                </ul>
                <!-- TAB CONTENT -->
                <form class="form-horizontal" action="<?php echo U('add');?>" method="post">
                    <div class="tab-content">
                        <!--第一页-->
                        <div role="tabpanel" class="active tab-pane fade in" id="tab1">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">所属栏目</label>
                                <div class="col-sm-5">
                                    <select class="form-control" name="category_id">
                                        <option>请选择</option>
                                        <?php if(is_array($cates)): $i = 0; $__LIST__ = $cates;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cate): $mod = ($i % 2 );++$i;?><option value="<?php echo ($cate["id"]); ?>"><?php echo ($cate["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">标题</label>
                                <div class="col-sm-5">
                                    <input type="text" name="title" class="form-control" placeholder="title">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">颜色</label>
                                <div class="col-sm-5">
                                    <div id="cp2" class="input-group colorpicker-component">
                                        <input type="text" name="color" value="#00AABB" class="form-control"/>
                                        <span class="input-group-addon"><i></i></span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">发布日期</label>
                                <div class="col-sm-5">
                                    <input type="text" name="time" id="time" class="form-control" placeholder="time">
                                </div>
                            </div>
                            <!--缩略图-->
                            <div class="form-group">
                                <label class="col-sm-3 control-label">缩略图</label>
                                <div class="col-sm-5">
                                    <input type="text" name="thumb" id="thumb" class="form-control" placeholder="thumb">
                                </div>
                                <div class="col-sm-2">
                                    <input type="button" value="上 传" id="ck_thumb_upload" class="btn btn-success"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-8">
                                    <img src="" id="img_show" width="90px" height="90px"/>
                                </div>
                            </div>

                            <!--附件上传-->
                            <div class="form-group">
                                <label class="col-sm-3 control-label">附件上传</label>
                                <div class="col-sm-5">
                                    <input type="button" id="add_file" class="btn btn-success" value="增 加">
                                </div>
                            </div>

                            <div id="files">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">附件(1)</label>
                                    <div class="col-sm-5">
                                        <input type="text" id="file1" class="form-control" name="file[]">
                                    </div>
                                    <div class="col-sm-3">
                                        <input type="button" value="上 传" onclick="ck_file_upload('file1')" class="btn btn-success">
                                        <input type="button" value="删 除" class="empty_file btn btn-success">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">摘要</label>
                                <div class="col-sm-5">
                                    <input type="text" name="description" class="form-control"
                                           placeholder="description">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">排序</label>
                                <div class="col-sm-5">
                                    <input type="text" name="sort_order" class="form-control"
                                           placeholder="sort_order">
                                </div>
                            </div>
                        </div>
                        <!--第二页-->
                        <div class="tab-pane fade" id="tab2">
                            <textarea name="content" id="content" cols="30" rows="10"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="submit" class="btn btn-primary">添 加</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/Public/vendor/js/jquery-3.2.0.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/Public/vendor/bootstrap/js/bootstrap.min.js"></script>

</body>
</html>